<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div>1</div>
    <div>2</div>
    <div>3</div>
    <script>
      var Get = document.getElementsByTagName("div");
      var Query = document.querySelectorAll("div");
      console.log("我是getElementsByTagName：" + Get.length);
      console.log("我是querySelector：" + Query.length);
      Get[0].remove();
      //   Query[0].remove();
      console.log("我是getElementsByTagName：" + Get.length);
      console.log("我是querySelector：" + Query.length);
    </script>
  </body>
</html>
